package cn.wolfcode.luowowo.common.util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public abstract class CheckMobile {

    /**
     * 验证手机号码格式是否正确
     * @param str
     * @return
     */
    public static boolean isMobile(String str) {
        Pattern p = null;
        Matcher m = null;
        boolean b = true;
        if(str != null || "".equals(str.trim())){
            p = Pattern.compile("^[1][3,4,5,7,8][0-9]{9}$");
            m = p.matcher(str);
            b = m.matches();
        }
        return b;
    }

}
